package com.dg11185.nearshop.test;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.android.nearshop.R;
import com.dg11185.libs.network.NetClient;
import com.dg11185.libs.network.http.client.HttpRequest.ActionListener;
import com.dg11185.nearshop.net.request.CheckUserNameRequest;
import com.dg11185.nearshop.net.response.CheckMemberResponse;

public class NetTestActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_template);
        
        CheckUserNameRequest request = new CheckUserNameRequest("linwangliang");
        request.setActionListener(new ActionListener<CheckMemberResponse>() {

            @Override
            public void onSuccess(CheckMemberResponse result) {
                Log.i("NearShop", result.responseStr);
                
            }

            @Override
            public void onFailure(int resultCode) {
                // TODO Auto-generated method stub
                
            }
        });
        NetClient.httpPost(request);
    }

}
